package com.atguigu.servicebase.handler;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Auther 赵乾坤
 * @Date 2021-06-26 1:40
 */
@ApiModel("自定义异常类")
@Data
@AllArgsConstructor//全构造器
@NoArgsConstructor//无参构造器
public class GuliException extends RuntimeException{


    @ApiModelProperty(value = "状态码")
    private Integer code;

    @ApiModelProperty(value = "信息")
    private String msg;

    @Override
    public String toString() {
        return "GuliException{" +
                "message=" + this.getMessage() +
                ", code=" + code +
                '}';
    }
}
